<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-- | Carries interesting info for debugging / profiling of the</span><span>
</span><span id="line-6"></span><span class="hs-comment">--   graph coloring register allocator.</span><span>
</span><span id="line-7"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.Stats</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-8"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier">RegAllocStats</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStats"><span class="hs-identifier">pprStats</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsSpills"><span class="hs-identifier">pprStatsSpills</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifetimes"><span class="hs-identifier">pprStatsLifetimes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsConflict"><span class="hs-identifier">pprStatsConflict</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifeConflict"><span class="hs-identifier">pprStatsLifeConflict</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRMs"><span class="hs-identifier">countSRMs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#addSRM"><span class="hs-identifier">addSRM</span></a></span><span>
</span><span id="line-17"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Color.html"><span class="hs-identifier">GHC.Data.Graph.Color</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Color</span></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Liveness</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Spill.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.Spill</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.SpillCost</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.TrivColorable.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.TrivColorable</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.Instr</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html"><span class="hs-identifier">GHC.Platform.Reg.Class</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Target.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Target</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html"><span class="hs-identifier">GHC.Utils.Monad.State</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">-- | Holds interesting statistics from the register allocator.</span><span>
</span><span id="line-38"></span><span class="hs-keyword">data</span><span> </span><span id="RegAllocStats"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-var">RegAllocStats</span></a></span></span><span> </span><span id="local-6989586621681025622"><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681025621"><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>        </span><span class="hs-comment">-- Information about the initial conflict graph.</span><span>
</span><span id="line-41"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="RegAllocStatsStart"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-var">RegAllocStatsStart</span></a></span></span><span>
</span><span id="line-42"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- | Initial code, with liveness.</span><span>
</span><span id="line-43"></span><span>          </span><span id="raLiveCmm"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raLiveCmm"><span class="hs-identifier hs-var hs-var">raLiveCmm</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>          </span><span class="hs-comment">-- | The initial, uncolored graph.</span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raGraph"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var hs-var">raGraph</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span>          </span><span class="hs-comment">-- | Information to help choose which regs to spill.</span><span>
</span><span id="line-49"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSpillCosts"><span class="annot"><span class="annottext">forall statics instr. RegAllocStats statics instr -&gt; SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillCosts"><span class="hs-identifier hs-var hs-var">raSpillCosts</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#SpillCostInfo"><span class="hs-identifier hs-type">SpillCostInfo</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>          </span><span class="hs-comment">-- | Target platform</span><span>
</span><span id="line-52"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raPlatform"><span class="annot"><span class="annottext">forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-53"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span>        </span><span class="hs-comment">-- Information about an intermediate graph.</span><span>
</span><span id="line-57"></span><span>        </span><span class="hs-comment">-- This is one that we couldn't color, so had to insert spill code</span><span>
</span><span id="line-58"></span><span>        </span><span class="hs-comment">-- instruction stream.</span><span>
</span><span id="line-59"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RegAllocStatsSpill"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsSpill"><span class="hs-identifier hs-var">RegAllocStatsSpill</span></a></span></span><span>
</span><span id="line-60"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- | Code we tried to allocate registers for.</span><span>
</span><span id="line-61"></span><span>          </span><span id="raCode"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCode"><span class="hs-identifier hs-var hs-var">raCode</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>          </span><span class="hs-comment">-- | Partially colored graph.</span><span>
</span><span id="line-64"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raGraph"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var">raGraph</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>          </span><span class="hs-comment">-- | The regs that were coalesced.</span><span>
</span><span id="line-67"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raCoalesced"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var hs-var">raCoalesced</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>          </span><span class="hs-comment">-- | Spiller stats.</span><span>
</span><span id="line-70"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSpillStats"><span class="annot"><span class="annottext">forall statics instr. RegAllocStats statics instr -&gt; SpillStats
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillStats"><span class="hs-identifier hs-var hs-var">raSpillStats</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Spill.html#SpillStats"><span class="hs-identifier hs-type">SpillStats</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span>          </span><span class="hs-comment">-- | Number of instructions each reg lives for.</span><span>
</span><span id="line-73"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSpillCosts"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillCosts"><span class="hs-identifier hs-var">raSpillCosts</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#SpillCostInfo"><span class="hs-identifier hs-type">SpillCostInfo</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>          </span><span class="hs-comment">-- | Code with spill instructions added.</span><span>
</span><span id="line-76"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSpilled"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpilled"><span class="hs-identifier hs-var hs-var">raSpilled</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>          </span><span class="hs-comment">-- | Target platform</span><span>
</span><span id="line-79"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raPlatform"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var">raPlatform</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-80"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span>        </span><span class="hs-comment">-- a successful coloring</span><span>
</span><span id="line-84"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RegAllocStatsColored"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsColored"><span class="hs-identifier hs-var">RegAllocStatsColored</span></a></span></span><span>
</span><span id="line-85"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- | Code we tried to allocate registers for.</span><span>
</span><span id="line-86"></span><span>          </span><span id="raCode"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCode"><span class="hs-identifier hs-var">raCode</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span>          </span><span class="hs-comment">-- | Uncolored graph.</span><span>
</span><span id="line-89"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raGraph"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var">raGraph</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span>          </span><span class="hs-comment">-- | Coalesced and colored graph.</span><span>
</span><span id="line-92"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raGraphColored"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraphColored"><span class="hs-identifier hs-var hs-var">raGraphColored</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>          </span><span class="hs-comment">-- | Regs that were coalesced.</span><span>
</span><span id="line-95"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raCoalesced"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var">raCoalesced</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span>          </span><span class="hs-comment">-- | Code with coalescings applied.</span><span>
</span><span id="line-98"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raCodeCoalesced"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCodeCoalesced"><span class="hs-identifier hs-var hs-var">raCodeCoalesced</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>          </span><span class="hs-comment">-- | Code with vregs replaced by hregs.</span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raPatched"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPatched"><span class="hs-identifier hs-var hs-var">raPatched</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span>          </span><span class="hs-comment">-- | Code with unneeded spill\/reloads cleaned out.</span><span>
</span><span id="line-104"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSpillClean"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillClean"><span class="hs-identifier hs-var hs-var">raSpillClean</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span>          </span><span class="hs-comment">-- | Final code.</span><span>
</span><span id="line-107"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raFinal"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raFinal"><span class="hs-identifier hs-var hs-var">raFinal</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025622"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025621"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span>          </span><span class="hs-comment">-- | Spill\/reload\/reg-reg moves present in this code.</span><span>
</span><span id="line-110"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raSRMs"><span class="annot"><span class="annottext">forall statics instr.
RegAllocStats statics instr -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSRMs"><span class="hs-identifier hs-var hs-var">raSRMs</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>          </span><span class="hs-comment">-- | Target platform</span><span>
</span><span id="line-113"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="raPlatform"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var">raPlatform</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-114"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span id="local-6989586621681025577"><span id="local-6989586621681025578"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681025420"><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025578"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025577"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>       </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025578"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025577"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span> </span><span id="local-6989586621681025372"><span class="annot"><span class="annottext">ppr :: RegAllocStats statics instr -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025370"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-type">RegAllocStatsStart</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-glyph">=</span><span>      </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Start&quot;</span></span><span>
</span><span id="line-122"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Native code with liveness information.&quot;</span></span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raLiveCmm"><span class="hs-identifier hs-var hs-var">raLiveCmm</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-124"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-125"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Initial register conflict graph.&quot;</span></span><span>
</span><span id="line-126"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">(RealReg -&gt; SDoc)
-&gt; Triv VirtualReg RegClass RealReg
-&gt; Graph VirtualReg RegClass RealReg
-&gt; SDoc
forall k cls color.
(Uniquable k, Outputable k, Outputable cls, Outputable color) =&gt;
(color -&gt; SDoc) -&gt; Triv k cls color -&gt; Graph k cls color -&gt; SDoc
</span><a href="GHC.Data.Graph.Ppr.html#dotGraph"><span class="hs-identifier hs-var">Color.dotGraph</span></a></span><span>
</span><span id="line-127"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRegDotColor"><span class="hs-identifier hs-var">targetRegDotColor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform
-&gt; (RegClass -&gt; VirtualReg -&gt; Int)
-&gt; (RegClass -&gt; RealReg -&gt; Int)
-&gt; Triv VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.TrivColorable.html#trivColorable"><span class="hs-identifier hs-var">trivColorable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; VirtualReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetVirtualRegSqueeze"><span class="hs-identifier hs-var">targetVirtualRegSqueeze</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; RealReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRealRegSqueeze"><span class="hs-identifier hs-var">targetRealRegSqueeze</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var hs-var">raGraph</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025370"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025362"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsSpill"><span class="hs-identifier hs-type">RegAllocStatsSpill</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-135"></span><span>           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Spill&quot;</span></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Code with liveness information.&quot;</span></span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCode"><span class="hs-identifier hs-var hs-var">raCode</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg VirtualReg -&gt; Bool
forall key elt. UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#isNullUFM"><span class="hs-identifier hs-var">isNullUFM</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqFM VirtualReg VirtualReg -&gt; Bool)
-&gt; UniqFM VirtualReg VirtualReg -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
forall statics instr.
RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var hs-var">raCoalesced</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>                </span><span class="hs-keyword">then</span><span>    </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Registers coalesced.&quot;</span></span><span>
</span><span id="line-143"></span><span>                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg VirtualReg
-&gt; ([(Unique, VirtualReg)] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([(Unique, a)] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFMWithKeys"><span class="hs-identifier hs-var">pprUFMWithKeys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
forall statics instr.
RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var hs-var">raCoalesced</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; ([(Unique, VirtualReg)] -&gt; [SDoc])
-&gt; [(Unique, VirtualReg)]
-&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Unique, VirtualReg) -&gt; SDoc) -&gt; [(Unique, VirtualReg)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique, VirtualReg) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-145"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Spills inserted.&quot;</span></span><span>
</span><span id="line-148"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">SpillStats -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; SpillStats
forall statics instr. RegAllocStats statics instr -&gt; SpillStats
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillStats"><span class="hs-identifier hs-var hs-var">raSpillStats</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Code with spills inserted.&quot;</span></span><span>
</span><span id="line-152"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpilled"><span class="hs-identifier hs-var hs-var">raSpilled</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025362"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025355"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsColored"><span class="hs-identifier hs-type">RegAllocStatsColored</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">raSRMs :: forall statics instr.
RegAllocStats statics instr -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSRMs"><span class="hs-identifier hs-var">raSRMs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025354"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025354"><span class="hs-identifier hs-var">spills</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025353"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025353"><span class="hs-identifier hs-var">reloads</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025352"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025352"><span class="hs-identifier hs-var">moves</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>    </span><span class="hs-glyph">=</span><span>      </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Colored&quot;</span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Code with liveness information.&quot;</span></span><span>
</span><span id="line-159"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCode"><span class="hs-identifier hs-var hs-var">raCode</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Register conflict graph (colored).&quot;</span></span><span>
</span><span id="line-163"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">(RealReg -&gt; SDoc)
-&gt; Triv VirtualReg RegClass RealReg
-&gt; Graph VirtualReg RegClass RealReg
-&gt; SDoc
forall k cls color.
(Uniquable k, Outputable k, Outputable cls, Outputable color) =&gt;
(color -&gt; SDoc) -&gt; Triv k cls color -&gt; Graph k cls color -&gt; SDoc
</span><a href="GHC.Data.Graph.Ppr.html#dotGraph"><span class="hs-identifier hs-var">Color.dotGraph</span></a></span><span>
</span><span id="line-164"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRegDotColor"><span class="hs-identifier hs-var">targetRegDotColor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform
-&gt; (RegClass -&gt; VirtualReg -&gt; Int)
-&gt; (RegClass -&gt; RealReg -&gt; Int)
-&gt; Triv VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.TrivColorable.html#trivColorable"><span class="hs-identifier hs-var">trivColorable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; VirtualReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetVirtualRegSqueeze"><span class="hs-identifier hs-var">targetVirtualRegSqueeze</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-167"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; RealReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRealRegSqueeze"><span class="hs-identifier hs-var">targetRealRegSqueeze</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Platform
forall statics instr. RegAllocStats statics instr -&gt; Platform
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPlatform"><span class="hs-identifier hs-var hs-var">raPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraphColored"><span class="hs-identifier hs-var hs-var">raGraphColored</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg VirtualReg -&gt; Bool
forall key elt. UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#isNullUFM"><span class="hs-identifier hs-var">isNullUFM</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqFM VirtualReg VirtualReg -&gt; Bool)
-&gt; UniqFM VirtualReg VirtualReg -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
forall statics instr.
RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var hs-var">raCoalesced</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>                </span><span class="hs-keyword">then</span><span>    </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Registers coalesced.&quot;</span></span><span>
</span><span id="line-173"></span><span>                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg VirtualReg
-&gt; ([(Unique, VirtualReg)] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([(Unique, a)] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFMWithKeys"><span class="hs-identifier hs-var">pprUFMWithKeys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
forall statics instr.
RegAllocStats statics instr -&gt; UniqFM VirtualReg VirtualReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCoalesced"><span class="hs-identifier hs-var hs-var">raCoalesced</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; ([(Unique, VirtualReg)] -&gt; [SDoc])
-&gt; [(Unique, VirtualReg)]
-&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Unique, VirtualReg) -&gt; SDoc) -&gt; [(Unique, VirtualReg)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique, VirtualReg) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-175"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Native code after coalescings applied.&quot;</span></span><span>
</span><span id="line-178"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raCodeCoalesced"><span class="hs-identifier hs-var hs-var">raCodeCoalesced</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Native code after register allocation.&quot;</span></span><span>
</span><span id="line-182"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raPatched"><span class="hs-identifier hs-var hs-var">raPatched</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Clean out unneeded spill/reloads.&quot;</span></span><span>
</span><span id="line-186"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [LiveCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillClean"><span class="hs-identifier hs-var hs-var">raSpillClean</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Final code, after rewriting spill/rewrite pseudo instrs.&quot;</span></span><span>
</span><span id="line-190"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; [NatCmmDecl statics instr]
forall statics instr.
RegAllocStats statics instr -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raFinal"><span class="hs-identifier hs-var hs-var">raFinal</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025355"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-192"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  Score:&quot;</span></span><span>
</span><span id="line-193"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#          spills  inserted: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025354"><span class="hs-identifier hs-var">spills</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#          reloads inserted: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025353"><span class="hs-identifier hs-var">reloads</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#   reg-reg moves remaining: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025352"><span class="hs-identifier hs-var">moves</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span></span></span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-comment">-- | Do all the different analysis on this list of RegAllocStats</span><span>
</span><span id="line-200"></span><span id="local-6989586621681025536"><span id="local-6989586621681025537"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStats"><span class="hs-identifier hs-type">pprStats</span></a></span><span>
</span><span id="line-201"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025537"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025536"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-202"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-203"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span id="pprStats"><span class="annot"><span class="annottext">pprStats :: forall statics instr.
[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStats"><span class="hs-identifier hs-var hs-var">pprStats</span></a></span></span><span> </span><span id="local-6989586621681025349"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025349"><span class="hs-identifier hs-var">stats</span></a></span></span><span> </span><span id="local-6989586621681025348"><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025348"><span class="hs-identifier hs-var">graph</span></a></span></span><span>
</span><span id="line-206"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681025347"><span class="annot"><span class="annottext">outSpills :: SDoc
</span><a href="#local-6989586621681025347"><span class="hs-identifier hs-var hs-var">outSpills</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr] -&gt; SDoc
forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsSpills"><span class="hs-identifier hs-var">pprStatsSpills</span></a></span><span>    </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025349"><span class="hs-identifier hs-var">stats</span></a></span><span>
</span><span id="line-207"></span><span>        </span><span id="local-6989586621681025346"><span class="annot"><span class="annottext">outLife :: SDoc
</span><a href="#local-6989586621681025346"><span class="hs-identifier hs-var hs-var">outLife</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr] -&gt; SDoc
forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifetimes"><span class="hs-identifier hs-var">pprStatsLifetimes</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025349"><span class="hs-identifier hs-var">stats</span></a></span><span>
</span><span id="line-208"></span><span>        </span><span id="local-6989586621681025345"><span class="annot"><span class="annottext">outConflict :: SDoc
</span><a href="#local-6989586621681025345"><span class="hs-identifier hs-var hs-var">outConflict</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr] -&gt; SDoc
forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsConflict"><span class="hs-identifier hs-var">pprStatsConflict</span></a></span><span>  </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025349"><span class="hs-identifier hs-var">stats</span></a></span><span>
</span><span id="line-209"></span><span>        </span><span id="local-6989586621681025344"><span class="annot"><span class="annottext">outScatter :: SDoc
</span><a href="#local-6989586621681025344"><span class="hs-identifier hs-var hs-var">outScatter</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
forall statics instr.
[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifeConflict"><span class="hs-identifier hs-var">pprStatsLifeConflict</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025349"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025348"><span class="hs-identifier hs-var">graph</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span>  </span><span class="hs-keyword">in</span><span>    </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681025347"><span class="hs-identifier hs-var">outSpills</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681025346"><span class="hs-identifier hs-var">outLife</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681025345"><span class="hs-identifier hs-var">outConflict</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681025344"><span class="hs-identifier hs-var">outScatter</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-comment">-- | Dump a table of how many spill loads \/ stores were inserted for each vreg.</span><span>
</span><span id="line-215"></span><span id="local-6989586621681025532"><span id="local-6989586621681025533"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsSpills"><span class="hs-identifier hs-type">pprStatsSpills</span></a></span><span>
</span><span id="line-216"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025533"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025532"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span id="pprStatsSpills"><span class="annot"><span class="annottext">pprStatsSpills :: forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsSpills"><span class="hs-identifier hs-var hs-var">pprStatsSpills</span></a></span></span><span> </span><span id="local-6989586621681025337"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025337"><span class="hs-identifier hs-var">stats</span></a></span></span><span>
</span><span id="line-219"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-220"></span><span>        </span><span id="local-6989586621681025336"><span class="annot"><span class="annottext">finals :: [RegAllocStats statics instr]
</span><a href="#local-6989586621681025336"><span class="hs-identifier hs-var hs-var">finals</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025335"><span class="hs-identifier hs-var">s</span></a></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681025335"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025335"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsColored"><span class="hs-identifier hs-type">RegAllocStatsColored</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025337"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>        </span><span class="hs-comment">-- sum up how many stores\/loads\/reg-reg-moves were left in the code</span><span>
</span><span id="line-223"></span><span>        </span><span id="local-6989586621681025332"><span class="annot"><span class="annottext">total :: (Int, Int, Int)
</span><a href="#local-6989586621681025332"><span class="hs-identifier hs-var hs-var">total</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Int, Int, Int) -&gt; (Int, Int, Int) -&gt; (Int, Int, Int))
-&gt; (Int, Int, Int) -&gt; [(Int, Int, Int)] -&gt; (Int, Int, Int)
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int, Int) -&gt; (Int, Int, Int) -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#addSRM"><span class="hs-identifier hs-var">addSRM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>                </span><span class="annot"><span class="annottext">([(Int, Int, Int)] -&gt; (Int, Int, Int))
-&gt; [(Int, Int, Int)] -&gt; (Int, Int, Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RegAllocStats statics instr -&gt; (Int, Int, Int))
-&gt; [RegAllocStats statics instr] -&gt; [(Int, Int, Int)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; (Int, Int, Int)
forall statics instr.
RegAllocStats statics instr -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSRMs"><span class="hs-identifier hs-var hs-var">raSRMs</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025336"><span class="hs-identifier hs-var">finals</span></a></span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span>    </span><span class="hs-keyword">in</span><span>  </span><span class="hs-special">(</span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-- spills-added-total&quot;</span></span><span>
</span><span id="line-227"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--    (stores, loads, reg_reg_moves_remaining)&quot;</span></span><span>
</span><span id="line-228"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int, Int) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int, Int)
</span><a href="#local-6989586621681025332"><span class="hs-identifier hs-var">total</span></a></span><span>
</span><span id="line-229"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | Dump a table of how long vregs tend to live for in the initial code.</span><span>
</span><span id="line-233"></span><span id="local-6989586621681025329"><span id="local-6989586621681025330"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifetimes"><span class="hs-identifier hs-type">pprStatsLifetimes</span></a></span><span>
</span><span id="line-234"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025330"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025329"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span id="pprStatsLifetimes"><span class="annot"><span class="annottext">pprStatsLifetimes :: forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifetimes"><span class="hs-identifier hs-var hs-var">pprStatsLifetimes</span></a></span></span><span> </span><span id="local-6989586621681025325"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025325"><span class="hs-identifier hs-var">stats</span></a></span></span><span>
</span><span id="line-237"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681025323"><span class="annot"><span class="annottext">info :: SpillCostInfo
</span><a href="#local-6989586621681025323"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SpillCostInfo -&gt; SpillCostInfo -&gt; SpillCostInfo)
-&gt; SpillCostInfo -&gt; [SpillCostInfo] -&gt; SpillCostInfo
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo -&gt; SpillCostInfo -&gt; SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#plusSpillCostInfo"><span class="hs-identifier hs-var">plusSpillCostInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#zeroSpillCostInfo"><span class="hs-identifier hs-var">zeroSpillCostInfo</span></a></span><span>
</span><span id="line-238"></span><span>                                </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; SpillCostInfo
forall statics instr. RegAllocStats statics instr -&gt; SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillCosts"><span class="hs-identifier hs-var hs-var">raSpillCosts</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025320"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-239"></span><span>                                        </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681025320"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025320"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-type">RegAllocStatsStart</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025325"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-240"></span><span>
</span><span id="line-241"></span><span>        </span><span id="local-6989586621681025319"><span class="annot"><span class="annottext">lifeBins :: UniqFM Int (Int, Int)
</span><a href="#local-6989586621681025319"><span class="hs-identifier hs-var hs-var">lifeBins</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int) -&gt; UniqFM Int (Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#binLifetimeCount"><span class="hs-identifier hs-var">binLifetimeCount</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqFM VirtualReg (VirtualReg, Int) -&gt; UniqFM Int (Int, Int))
-&gt; UniqFM VirtualReg (VirtualReg, Int) -&gt; UniqFM Int (Int, Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo -&gt; UniqFM VirtualReg (VirtualReg, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#lifeMapFromSpillCostInfo"><span class="hs-identifier hs-var">lifeMapFromSpillCostInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo
</span><a href="#local-6989586621681025323"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="hs-special">(</span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-- vreg-population-lifetimes&quot;</span></span><span>
</span><span id="line-244"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--   (instruction_count, number_of_vregs_that_lived_that_long)&quot;</span></span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int) -&gt; ([(Int, Int)] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([a] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFM"><span class="hs-identifier hs-var">pprUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int)
</span><a href="#local-6989586621681025319"><span class="hs-identifier hs-var">lifeBins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; ([(Int, Int)] -&gt; [SDoc]) -&gt; [(Int, Int)] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Int, Int) -&gt; SDoc) -&gt; [(Int, Int)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#binLifetimeCount"><span class="hs-identifier hs-type">binLifetimeCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span id="binLifetimeCount"><span class="annot"><span class="annottext">binLifetimeCount :: UniqFM VirtualReg (VirtualReg, Int) -&gt; UniqFM Int (Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#binLifetimeCount"><span class="hs-identifier hs-var hs-var">binLifetimeCount</span></a></span></span><span> </span><span id="local-6989586621681025315"><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int)
</span><a href="#local-6989586621681025315"><span class="hs-identifier hs-var">fm</span></a></span></span><span>
</span><span id="line-251"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681025313"><span class="annot"><span class="annottext">lifes :: [(Int, (Int, Int))]
</span><a href="#local-6989586621681025313"><span class="hs-identifier hs-var hs-var">lifes</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; (Int, (Int, Int))) -&gt; [Int] -&gt; [(Int, (Int, Int))]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681025312"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025312"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025312"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025312"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>                </span><span class="annot"><span class="annottext">([Int] -&gt; [(Int, (Int, Int))]) -&gt; [Int] -&gt; [(Int, (Int, Int))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((VirtualReg, Int) -&gt; Int) -&gt; [(VirtualReg, Int)] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(VirtualReg, Int) -&gt; Int
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span>
</span><span id="line-253"></span><span>                </span><span class="annot"><span class="annottext">([(VirtualReg, Int)] -&gt; [Int]) -&gt; [(VirtualReg, Int)] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int) -&gt; [(VirtualReg, Int)]
forall key elt. UniqFM key elt -&gt; [elt]
</span><a href="GHC.Types.Unique.FM.html#nonDetEltsUFM"><span class="hs-identifier hs-var">nonDetEltsUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int)
</span><a href="#local-6989586621681025315"><span class="hs-identifier hs-var">fm</span></a></span><span>
</span><span id="line-254"></span><span>                </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">((Int, Int) -&gt; (Int, Int) -&gt; (Int, Int))
-&gt; UniqFM Int (Int, Int)
-&gt; [(Int, (Int, Int))]
-&gt; UniqFM Int (Int, Int)
forall key elt.
Uniquable key =&gt;
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; [(key, elt)] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addListToUFM_C"><span class="hs-identifier hs-var">addListToUFM_C</span></a></span><span>
</span><span id="line-257"></span><span>                </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681025309"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025309"><span class="hs-identifier hs-var">l1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025308"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025308"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025307"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025307"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025309"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025308"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025307"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>                </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int)
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-259"></span><span>                </span><span class="annot"><span class="annottext">[(Int, (Int, Int))]
</span><a href="#local-6989586621681025313"><span class="hs-identifier hs-var">lifes</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="hs-comment">-- | Dump a table of how many conflicts vregs tend to have in the initial code.</span><span>
</span><span id="line-263"></span><span id="local-6989586621681025303"><span id="local-6989586621681025304"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsConflict"><span class="hs-identifier hs-type">pprStatsConflict</span></a></span><span>
</span><span id="line-264"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025304"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025303"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span id="pprStatsConflict"><span class="annot"><span class="annottext">pprStatsConflict :: forall statics instr. [RegAllocStats statics instr] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsConflict"><span class="hs-identifier hs-var hs-var">pprStatsConflict</span></a></span></span><span> </span><span id="local-6989586621681025299"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025299"><span class="hs-identifier hs-var">stats</span></a></span></span><span>
</span><span id="line-267"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681025296"><span class="annot"><span class="annottext">confMap :: UniqFM Int (Int, Int)
</span><a href="#local-6989586621681025296"><span class="hs-identifier hs-var hs-var">confMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UniqFM Int (Int, Int)
 -&gt; UniqFM Int (Int, Int) -&gt; UniqFM Int (Int, Int))
-&gt; UniqFM Int (Int, Int)
-&gt; [UniqFM Int (Int, Int)]
-&gt; UniqFM Int (Int, Int)
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Int, Int) -&gt; (Int, Int) -&gt; (Int, Int))
-&gt; UniqFM Int (Int, Int)
-&gt; UniqFM Int (Int, Int)
-&gt; UniqFM Int (Int, Int)
forall elt key.
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFM_C"><span class="hs-identifier hs-var">plusUFM_C</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681025294"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025294"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025293"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025293"><span class="hs-identifier hs-var">n1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025292"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025292"><span class="hs-identifier hs-var">n2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025294"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025293"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025292"><span class="hs-identifier hs-var">n2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>                        </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int)
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-269"></span><span>                </span><span class="annot"><span class="annottext">([UniqFM Int (Int, Int)] -&gt; UniqFM Int (Int, Int))
-&gt; [UniqFM Int (Int, Int)] -&gt; UniqFM Int (Int, Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Graph VirtualReg RegClass RealReg -&gt; UniqFM Int (Int, Int))
-&gt; [Graph VirtualReg RegClass RealReg] -&gt; [UniqFM Int (Int, Int)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg -&gt; UniqFM Int (Int, Int)
forall k cls color. Graph k cls color -&gt; UniqFM Int (Int, Int)
</span><a href="GHC.Data.Graph.Ops.html#slurpNodeConflictCount"><span class="hs-identifier hs-var">Color.slurpNodeConflictCount</span></a></span><span>
</span><span id="line-270"></span><span>                        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var hs-var">raGraph</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025290"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681025290"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025290"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-type">RegAllocStatsStart</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025299"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="hs-special">(</span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-- vreg-conflicts&quot;</span></span><span>
</span><span id="line-273"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--   (conflict_count, number_of_vregs_that_had_that_many_conflicts)&quot;</span></span><span>
</span><span id="line-274"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int) -&gt; ([(Int, Int)] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([a] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFM"><span class="hs-identifier hs-var">pprUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Int (Int, Int)
</span><a href="#local-6989586621681025296"><span class="hs-identifier hs-var">confMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc)
-&gt; ([(Int, Int)] -&gt; [SDoc]) -&gt; [(Int, Int)] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Int, Int) -&gt; SDoc) -&gt; [(Int, Int)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="hs-comment">-- | For every vreg, dump how many conflicts it has, and its lifetime.</span><span>
</span><span id="line-279"></span><span class="hs-comment">--      Good for making a scatter plot.</span><span>
</span><span id="line-280"></span><span id="local-6989586621681025288"><span id="local-6989586621681025289"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifeConflict"><span class="hs-identifier hs-type">pprStatsLifeConflict</span></a></span><span>
</span><span id="line-281"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025289"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025288"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-282"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Color.Graph</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-comment">-- ^ global register conflict graph</span><span>
</span><span id="line-283"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span id="pprStatsLifeConflict"><span class="annot"><span class="annottext">pprStatsLifeConflict :: forall statics instr.
[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStatsLifeConflict"><span class="hs-identifier hs-var hs-var">pprStatsLifeConflict</span></a></span></span><span> </span><span id="local-6989586621681025287"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025287"><span class="hs-identifier hs-var">stats</span></a></span></span><span> </span><span id="local-6989586621681025286"><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025286"><span class="hs-identifier hs-var">graph</span></a></span></span><span>
</span><span id="line-286"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681025284"><span class="annot"><span class="annottext">lifeMap :: UniqFM VirtualReg (VirtualReg, Int)
</span><a href="#local-6989586621681025284"><span class="hs-identifier hs-var hs-var">lifeMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SpillCostInfo -&gt; UniqFM VirtualReg (VirtualReg, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#lifeMapFromSpillCostInfo"><span class="hs-identifier hs-var">lifeMapFromSpillCostInfo</span></a></span><span>
</span><span id="line-287"></span><span>                </span><span class="annot"><span class="annottext">(SpillCostInfo -&gt; UniqFM VirtualReg (VirtualReg, Int))
-&gt; SpillCostInfo -&gt; UniqFM VirtualReg (VirtualReg, Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(SpillCostInfo -&gt; SpillCostInfo -&gt; SpillCostInfo)
-&gt; SpillCostInfo -&gt; [SpillCostInfo] -&gt; SpillCostInfo
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo -&gt; SpillCostInfo -&gt; SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#plusSpillCostInfo"><span class="hs-identifier hs-var">plusSpillCostInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.SpillCost.html#zeroSpillCostInfo"><span class="hs-identifier hs-var">zeroSpillCostInfo</span></a></span><span>
</span><span id="line-288"></span><span>                </span><span class="annot"><span class="annottext">([SpillCostInfo] -&gt; SpillCostInfo)
-&gt; [SpillCostInfo] -&gt; SpillCostInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; SpillCostInfo
forall statics instr. RegAllocStats statics instr -&gt; SpillCostInfo
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raSpillCosts"><span class="hs-identifier hs-var hs-var">raSpillCosts</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681025283"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681025283"><span class="annot"><span class="annottext">s :: RegAllocStats statics instr
</span><a href="#local-6989586621681025283"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-type">RegAllocStatsStart</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681025287"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span>        </span><span id="local-6989586621681025279"><span class="annot"><span class="annottext">scatter :: [SDoc]
</span><a href="#local-6989586621681025279"><span class="hs-identifier hs-var hs-var">scatter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VirtualReg -&gt; SDoc) -&gt; [VirtualReg] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span>   </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681025278"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681025278"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681025276"><span class="annot"><span class="annottext">lifetime :: Int
</span><a href="#local-6989586621681025276"><span class="hs-identifier hs-var hs-var">lifetime</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int)
-&gt; VirtualReg -&gt; Maybe (VirtualReg, Int)
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (VirtualReg, Int)
</span><a href="#local-6989586621681025284"><span class="hs-identifier hs-var">lifeMap</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681025278"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-291"></span><span>                                                      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025274"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025274"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025274"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-292"></span><span>                                                      </span><span class="annot"><span class="annottext">Maybe (VirtualReg, Int)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-293"></span><span>                                    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681025272"><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025272"><span class="hs-identifier hs-var">node</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
-&gt; VirtualReg -&gt; Maybe (Node VirtualReg RegClass RealReg)
forall k cls color.
Uniquable k =&gt;
Graph k cls color -&gt; k -&gt; Maybe (Node k cls color)
</span><a href="GHC.Data.Graph.Ops.html#lookupNode"><span class="hs-identifier hs-var">Color.lookupNode</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025286"><span class="hs-identifier hs-var">graph</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681025278"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-294"></span><span>                                </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>                                        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(VirtualReg -&gt; SDoc) -&gt; VirtualReg -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg -&gt; VirtualReg
forall k cls color. Node k cls color -&gt; k
</span><a href="GHC.Data.Graph.Base.html#nodeId"><span class="hs-identifier hs-var hs-var">Color.nodeId</span></a></span><span> </span><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025272"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-296"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; SDoc) -&gt; Int -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet VirtualReg -&gt; Int
forall a. UniqSet a -&gt; Int
</span><a href="GHC.Types.Unique.Set.html#sizeUniqSet"><span class="hs-identifier hs-var">sizeUniqSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg -&gt; UniqSet VirtualReg
forall k cls color. Node k cls color -&gt; UniqSet k
</span><a href="GHC.Data.Graph.Base.html#nodeConflicts"><span class="hs-identifier hs-var hs-var">Color.nodeConflicts</span></a></span><span> </span><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025272"><span class="hs-identifier hs-var">node</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; SDoc) -&gt; Int -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025276"><span class="hs-identifier hs-var">lifetime</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span>                </span><span class="annot"><span class="annottext">([VirtualReg] -&gt; [SDoc]) -&gt; [VirtualReg] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Node VirtualReg RegClass RealReg -&gt; VirtualReg)
-&gt; [Node VirtualReg RegClass RealReg] -&gt; [VirtualReg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Node VirtualReg RegClass RealReg -&gt; VirtualReg
forall k cls color. Node k cls color -&gt; k
</span><a href="GHC.Data.Graph.Base.html#nodeId"><span class="hs-identifier hs-var hs-var">Color.nodeId</span></a></span><span>
</span><span id="line-299"></span><span>                </span><span class="annot"><span class="annottext">([Node VirtualReg RegClass RealReg] -&gt; [VirtualReg])
-&gt; [Node VirtualReg RegClass RealReg] -&gt; [VirtualReg]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM VirtualReg (Node VirtualReg RegClass RealReg)
-&gt; [Node VirtualReg RegClass RealReg]
forall key elt. UniqFM key elt -&gt; [elt]
</span><a href="GHC.Types.Unique.FM.html#nonDetEltsUFM"><span class="hs-identifier hs-var">nonDetEltsUFM</span></a></span><span>
</span><span id="line-300"></span><span>                </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-301"></span><span>                </span><span class="annot"><span class="annottext">(UniqFM VirtualReg (Node VirtualReg RegClass RealReg)
 -&gt; [Node VirtualReg RegClass RealReg])
-&gt; UniqFM VirtualReg (Node VirtualReg RegClass RealReg)
-&gt; [Node VirtualReg RegClass RealReg]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
-&gt; UniqFM VirtualReg (Node VirtualReg RegClass RealReg)
forall k cls color.
Graph k cls color -&gt; UniqFM k (Node k cls color)
</span><a href="GHC.Data.Graph.Base.html#graphMap"><span class="hs-identifier hs-var hs-var">Color.graphMap</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681025286"><span class="hs-identifier hs-var">graph</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="hs-special">(</span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-- vreg-conflict-lifetime&quot;</span></span><span>
</span><span id="line-304"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--   (vreg, vreg_conflicts, vreg_lifetime)&quot;</span></span><span>
</span><span id="line-305"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc]
</span><a href="#local-6989586621681025279"><span class="hs-identifier hs-var">scatter</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | Count spill/reload/reg-reg moves.</span><span>
</span><span id="line-310"></span><span class="hs-comment">--      Lets us see how well the register allocator has done.</span><span>
</span><span id="line-311"></span><span id="local-6989586621681025482"><span id="local-6989586621681025484"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRMs"><span class="hs-identifier hs-type">countSRMs</span></a></span><span>
</span><span id="line-312"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025484"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-313"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025482"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025484"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span id="countSRMs"><span class="annot"><span class="annottext">countSRMs :: forall instr statics.
Instruction instr =&gt;
LiveCmmDecl statics instr -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRMs"><span class="hs-identifier hs-var hs-var">countSRMs</span></a></span></span><span> </span><span id="local-6989586621681025258"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681025258"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-316"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State (Int, Int, Int) (LiveCmmDecl statics instr)
-&gt; (Int, Int, Int) -&gt; (Int, Int, Int)
forall s a. State s a -&gt; s -&gt; s
</span><a href="GHC.Utils.Monad.State.html#execState"><span class="hs-identifier hs-var">execState</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LiveBasicBlock instr
 -&gt; State (Int, Int, Int) (LiveBasicBlock instr))
-&gt; LiveCmmDecl statics instr
-&gt; State (Int, Int, Int) (LiveCmmDecl statics instr)
forall (m :: * -&gt; *) instr statics.
Monad m =&gt;
(LiveBasicBlock instr -&gt; m (LiveBasicBlock instr))
-&gt; LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier hs-var">mapBlockTopM</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
-&gt; State (Int, Int, Int) (LiveBasicBlock instr)
forall instr.
Instruction instr =&gt;
GenBasicBlock (LiveInstr instr)
-&gt; State (Int, Int, Int) (GenBasicBlock (LiveInstr instr))
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_block"><span class="hs-identifier hs-var">countSRM_block</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681025258"><span class="hs-identifier hs-var">cmm</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span id="local-6989586621681025472"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_block"><span class="hs-identifier hs-type">countSRM_block</span></a></span><span>
</span><span id="line-320"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025472"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-321"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025472"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-322"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025472"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span id="countSRM_block"><span class="annot"><span class="annottext">countSRM_block :: forall instr.
Instruction instr =&gt;
GenBasicBlock (LiveInstr instr)
-&gt; State (Int, Int, Int) (GenBasicBlock (LiveInstr instr))
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_block"><span class="hs-identifier hs-var hs-var">countSRM_block</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681025246"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681025246"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681025245"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681025245"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-325"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681025244"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681025244"><span class="hs-identifier hs-var">instrs'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr))
-&gt; [LiveInstr instr] -&gt; State (Int, Int, Int) [LiveInstr instr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
forall instr.
Instruction instr =&gt;
LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_instr"><span class="hs-identifier hs-var">countSRM_instr</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681025245"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-326"></span><span>        </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
-&gt; State (Int, Int, Int) (GenBasicBlock (LiveInstr instr))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="annot"><span class="annottext">(GenBasicBlock (LiveInstr instr)
 -&gt; State (Int, Int, Int) (GenBasicBlock (LiveInstr instr)))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; State (Int, Int, Int) (GenBasicBlock (LiveInstr instr))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681025246"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681025244"><span class="hs-identifier hs-var">instrs'</span></a></span><span>
</span><span id="line-327"></span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span id="local-6989586621681025465"><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_instr"><span class="hs-identifier hs-type">countSRM_instr</span></a></span><span>
</span><span id="line-330"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025465"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-331"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025465"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681025465"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span id="countSRM_instr"><span class="annot"><span class="annottext">countSRM_instr :: forall instr.
Instruction instr =&gt;
LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#countSRM_instr"><span class="hs-identifier hs-var hs-var">countSRM_instr</span></a></span></span><span> </span><span id="local-6989586621681025225"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span></span><span>
</span><span id="line-334"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-335"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>    </span><span class="annot"><span class="annottext">((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall s. (s -&gt; s) -&gt; State s ()
</span><a href="GHC.Utils.Monad.State.html#modify"><span class="hs-identifier hs-var">modify</span></a></span><span>  </span><span class="annot"><span class="annottext">(((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ())
-&gt; ((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681025221"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025221"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025220"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025220"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025219"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025219"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025221"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025220"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025219"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>                </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-339"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>    </span><span class="annot"><span class="annottext">((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall s. (s -&gt; s) -&gt; State s ()
</span><a href="GHC.Utils.Monad.State.html#modify"><span class="hs-identifier hs-var">modify</span></a></span><span>  </span><span class="annot"><span class="annottext">(((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ())
-&gt; ((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681025217"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025217"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025216"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025216"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025215"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025215"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025217"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025216"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025215"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-340"></span><span>                </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681025214"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681025214"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-343"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Reg, Reg)
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe (Reg, Reg)
forall instr. Instruction instr =&gt; instr -&gt; Maybe (Reg, Reg)
</span><a href="GHC.CmmToAsm.Instr.html#takeRegRegMoveInstr"><span class="hs-identifier hs-var">takeRegRegMoveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681025214"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-344"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>    </span><span class="annot"><span class="annottext">((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall s. (s -&gt; s) -&gt; State s ()
</span><a href="GHC.Utils.Monad.State.html#modify"><span class="hs-identifier hs-var">modify</span></a></span><span>  </span><span class="annot"><span class="annottext">(((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ())
-&gt; ((Int, Int, Int) -&gt; (Int, Int, Int)) -&gt; State (Int, Int, Int) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681025212"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025212"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025211"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025211"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025210"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025210"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025212"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025211"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025210"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-345"></span><span>                </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-346"></span><span>
</span><span id="line-347"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-348"></span><span>        </span><span class="hs-glyph">=</span><span>       </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; State (Int, Int, Int) (LiveInstr instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681025225"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span class="hs-comment">-- sigh..</span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#addSRM"><span class="hs-identifier hs-type">addSRM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span id="addSRM"><span class="annot"><span class="annottext">addSRM :: (Int, Int, Int) -&gt; (Int, Int, Int) -&gt; (Int, Int, Int)
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#addSRM"><span class="hs-identifier hs-var hs-var">addSRM</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025209"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025209"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025208"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025208"><span class="hs-identifier hs-var">r1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025207"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025207"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681025206"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025206"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025205"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025205"><span class="hs-identifier hs-var">r2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681025204"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025204"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-354"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span class="hs-glyph">!</span><span id="local-6989586621681025202"><span class="annot"><span class="annottext">s :: Int
</span><a href="#local-6989586621681025202"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025209"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025206"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-355"></span><span>        </span><span class="hs-glyph">!</span><span id="local-6989586621681025200"><span class="annot"><span class="annottext">r :: Int
</span><a href="#local-6989586621681025200"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025208"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025205"><span class="hs-identifier hs-var">r2</span></a></span><span>
</span><span id="line-356"></span><span>        </span><span class="hs-glyph">!</span><span id="local-6989586621681025198"><span class="annot"><span class="annottext">m :: Int
</span><a href="#local-6989586621681025198"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025207"><span class="hs-identifier hs-var">m1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025204"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-357"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025202"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025200"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681025198"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span></pre></body></html>